package com.mengwen.backstage.mapper;

import com.mengwen.backstage.pojo.WeixinUser;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;


@Mapper
@Repository
public interface WeChatUserInfoMapper {


    @Insert("insert into weixin_user(openid,nickname,language,city,country,headimgurl,subscribe_time,sex,province,unionid)" +
            " values(#{openid},#{nickname},#{language},#{city},#{country},#{headimgurl},#{subscribe_time},#{sex},#{province},#{unionid})")
    public int addWeixinUser(WeixinUser weixinUser);


    @Update("DELETE FROM weixin_user WHERE openid = #{openid}")
    public int deleteByOpenid(String openid);



}
